/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */
import type { MaFormItem } from '@mineadmin/form'
import hasAuth from '@/utils/permission/hasAuth.ts'
import MaDictSelect from '@/components/ma-dict-picker/ma-dict-select.vue'
import MaUploadFile from '@/components/ma-upload-file/index.vue'
import { concat } from 'lodash-es'

export default function getFormItems(formType: 'add' | 'edit' = 'add', t: any, model: any): MaFormItem[] {
    

      return concat([
    { label: '广播内容', prop: 'broadcast_content', render: 'editor', renderProps: { placeholder: t('form.pleaseInput', { msg: '广播内容'}) } },
    { label: '结束播放时间', prop: 'end_time', render: 'DatePicker', renderProps: { placeholder: t('form.pleaseInput', { msg: '结束播放时间'}) }, mode: 'date', showTime: true },
    { label: '实际执行时长（秒）', prop: 'actual_duration', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '实际执行时长（秒）'}) } },
    { label: '失败原因', prop: 'fail_reason', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '失败原因'}) } },
    { label: '播放音量', prop: 'volume_level', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '播放音量'}) }, itemProps: { rules: [
    { required: true, message: '请输入播放音量' },
  ] } },
    { label: '设备ID', prop: 'device_id', render: () => MaDictSelect, renderProps: { multiple: false }, itemProps: { rules: [
    { required: true, message: '请输入设备ID' },
  ] } },
    { label: '文件路径', prop: 'file', render: () => MaUploadFile, renderProps: { placeholder: t('form.pleaseInput', { msg: '文件路径'}) }, itemProps: { rules: [
    { required: true, message: '请输入文件路径' },
  ] }, multiple: false },
  ]);
}
